import requests

# 发送HTTP请求
response = requests.get('https://www.baidu.com')

# 打印状态码
print(">>> Status Code:", response.status_code)

# 打印响应头
print(">>> Response Headers:")
for key, value in response.headers.items():
    print(f"{key}: {value}")

# 打印响应体（如果存在）
if response.text:
    print(">>> Response Body:")
    print(response.text)
else:
    print("--- No Response Body")

# 打印Cookies（如果存在）
if response.cookies:
    print(">>> Cookies:")
    for cookie in response.cookies:
        print(f"{cookie.name}: {cookie.value}")
else:
    print("--- No Cookies")